package cn.kmsoft.common;


import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.io.Serializable;

public class ReqResult implements Serializable {
	private boolean success;//服务器处理状态，处理成功为
	private String msg;//服务器消息
	private Object data;//服务器返回的数据
	
	public ReqResult(){
		success = false;
	}

	public boolean isSuccess() {
		return success;
	}
	public void setSuccess(boolean success) {
		this.success = success;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}

	public static JSONObject toJsonObject(ReqResult res){
		return (JSONObject) JSON.toJSON(res);
	}
}
